package com.ssy.lingxi.product.repository.channelCommodity;

import com.ssy.lingxi.product.entity.channelCommodity.ChannelCommodityShop;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 渠道商品持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/28
 */
public interface ChannelCommodityShopRepository extends JpaRepository<ChannelCommodityShop,Long>, JpaSpecificationExecutor<ChannelCommodityShop> {
    @Transactional
    void deleteChannelCommodityShopByChannelCommodityMemberId(Long id);

    @Transactional
    void deleteChannelCommodityShopByChannelCommodityMemberIdIn(List<Long> idList);

    List<ChannelCommodityShop> findByChannelCommodityMemberIdInAndShopId(List<Long> channelCommodityMemberIdList, Long shopId);
}
